<template>
  <div class="content-box">
    <el-card class="box-card">
      <div slot="header" class="content-header clearfix">
        <h1>
          {{ title }}
          <span class="subtitle">{{ subtitle }}</span>
        </h1>
        <div>
          <slot name="toolbar"/>
        </div>
      </div>
      <slot/>
    </el-card>
  </div>
</template>


<script>
export default {
  props: {
    title: {
      type: String,
      require: true
    },
    subtitle: {
      type: String,
      default: ''
    }
  }
}
</script>

<style scoped lang="less">
.content-box {
  padding: 15px;

  .content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    h1 {
      font-size: 24px;
      font-weight: 600;

      .subtitle {
        color: #8c939d;
        font-size: 18px;
      }
    }
  }
}
</style>
